home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / cat3 / Vk / VkPopupMenu.z / VkPopupMenu
Encoding:
Text File  |  2002-10-03  |  11.9 KB  |  331 lines

  1.  
  2.  
  3.  
  4. VVVVkkkkPPPPooooppppuuuuppppMMMMeeeennnnuuuu((((3333xxxx))))                                                VVVVkkkkPPPPooooppppuuuuppppMMMMeeeennnnuuuu((((3333xxxx))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      VkPopupMenu - A Popup menu class
  10.  
  11. IIIINNNNHHHHEEEERRRRIIIITTTTSSSS FFFFRRRROOOOMMMM
  12.      VkMenu : VkMenuItem : VkComponent : VkCallbackObject
  13.  
  14. HHHHEEEEAAAADDDDEEEERRRR FFFFIIIILLLLEEEE
  15.      #include <Vk/VkPopupMenu.h>
  16.  
  17.  
  18. PPPPUUUUBBBBLLLLIIIICCCC PPPPRRRROOOOTTTTOOOOCCCCOOOOLLLL SSSSUUUUMMMMMMMMAAAARRRRYYYY
  19.    CCCCoooonnnnssssttttrrrruuuuccccttttoooorrrr////DDDDeeeessssttttrrrruuuuccccttttoooorrrr
  20.            VkPopupMenu(VkMenuDesc *desc,
  21.                        XtPointer   defaultClientData = NULL);
  22.            VkPopupMenu(const char *name = "popupMenu",
  23.                        VkMenuDesc *desc = NULL,
  24.                        XtPointer   defaultClientData = NULL);
  25.  
  26.            VkPopupMenu(Widget      parent,
  27.                        VkMenuDesc *desc,
  28.                        XtPointer   defaultClientData = NULL);
  29.            VkPopupMenu(Widget      parent,
  30.                        const char *name = "popupMenu",
  31.                        VkMenuDesc *desc = NULL,
  32.                        XtPointer   defaultClientData = NULL);
  33.  
  34.            ~VkPopupMenu();
  35.  
  36.  
  37.    DDDDiiiissssppppllllaaaayyyyiiiinnnngggg MMMMeeeennnnuuuussss""""
  38.            virtual void build(Widget p);
  39.            virtual void attach(Widget p);
  40.            virtual void show();
  41.            virtual void show(XEvent *buttonPressEvent);
  42.  
  43.  
  44.  
  45.    AAAAcccccccceeeessssssss FFFFuuuunnnnccccttttiiiioooonnnnssss""""
  46.            virtual VkMenuItemType menuType();
  47.            virtual const char* className();
  48.  
  49.  
  50. CCCCLLLLAAAASSSSSSSS DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  51.      VkPopupMenu supports popup menus based on ViewKit menu objects.
  52.      VkPopupMenu provides the same interface as other subclasses of VkMenu.
  53.      See VkMenu for a description of how to add items to a menu. A popup menu
  54.      can be built as a child of any widget, and popped up by calling show()
  55.      with an X event pointer, or a popup menu can be "attached" to one or more
  56.      widgets, so that it pops up automatically when the user presses mouse
  57.      button 3 over that widget.
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. VVVVkkkkPPPPooooppppuuuuppppMMMMeeeennnnuuuu((((3333xxxx))))                                                VVVVkkkkPPPPooooppppuuuuppppMMMMeeeennnnuuuu((((3333xxxx))))
  71.  
  72.  
  73.  
  74. FFFFUUUUNNNNCCCCTTTTIIIIOOOONNNN DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNNSSSS
  75.    VVVVkkkkPPPPooooppppuuuuppppMMMMeeeennnnuuuu
  76.            VkPopupMenu(VkMenuDesc *desc,
  77.                        XtPointer   defaultClientData = NULL);
  78.            VkPopupMenu(const char *name = "popupMenu",
  79.                        VkMenuDesc *desc = NULL,
  80.                        XtPointer   defaultClientData = NULL);
  81.  
  82.            VkPopupMenu(Widget      parent,
  83.                        VkMenuDesc *desc,
  84.                        XtPointer   defaultClientData = NULL);
  85.  
  86.            VkPopupMenu(Widget      parent,
  87.                        const char *name = "popupMenu",
  88.                        VkMenuDesc *desc = NULL,
  89.                        XtPointer   defaultClientData = NULL);
  90.  
  91.  
  92.           The VkPopupMenu constructor initializes a VkPopup object. If one of
  93.           the forms that takes a widget is used, the menu is automatically
  94.           attached to the given widget. (See attach(), below.) For schemes to
  95.           work appropriately, popup menus should be named "poupMenu". If no
  96.           name is specified in a constructor, this default name will be used.
  97.           All forms of the constructor support a defaultClientData argument
  98.           which can be used to supply a clientData argument for use with menu
  99.           items added to the pane whose callbacks do not specify clientData.
  100.           This allows menus to be specified statically, while still allowing
  101.           an instance pointer to be used with callbacks. For example, the
  102.           following code segment creates a popup menu.  All callbacks
  103.           associated with the menu will be passed the instance pointer of the
  104.           object that creates the popup menu object.
  105.  
  106.  
  107.            class Sample: public VkWindow {
  108.  
  109.             private:
  110.  
  111.               static void oneCallback( Widget,
  112.                                        XtPointer ,
  113.                                        XtPointer);
  114.               static void twoCallback( Widget,
  115.                                        XtPointer ,
  116.                                        XtPointer);
  117.  
  118.               static VkMenuDesc popupDescription[];
  119.  
  120.             protected:
  121.  
  122.             public:
  123.  
  124.               Sample( const char *name) : VkWindow( name)
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. VVVVkkkkPPPPooooppppuuuuppppMMMMeeeennnnuuuu((((3333xxxx))))                                                VVVVkkkkPPPPooooppppuuuuppppMMMMeeeennnnuuuu((((3333xxxx))))
  137.  
  138.  
  139.  
  140.               // Other members
  141.            };
  142.  
  143.            SampleWindow::SampleWindow(char *name) :
  144.                                VkWindow(name)
  145.            {
  146.                VkPopupMenu *popup;
  147.  
  148.                Widget w = XmCreateForm(parent, "form",
  149.                                        NULL, 0);
  150.  
  151.                popup  = new VkPopupMenu(w,
  152.                                         popupDescription,
  153.                                        (XtPointer) this);
  154.  
  155.               // Other actions
  156.            }
  157.  
  158.  
  159.    ~~~~VVVVkkkkPPPPooooppppuuuuppppMMMMeeeennnnuuuu(((())))
  160.            ~VkPopupMenu();
  161.  
  162.  
  163.           The VkPopupMenu destructor removes all callbacks from all attached
  164.           widgets.  Base class destructors free the widgets used by the menu.
  165.  
  166.    bbbbuuuuiiiilllldddd(((())))
  167.            virtual void build(Widget p);
  168.  
  169.  
  170.           Builds the widgets in a VkPopupMenu object. If build() is used,
  171.           popping up the menu is the callers responsibility.
  172.  
  173.    aaaattttttttaaaacccchhhh(((())))
  174.            virtual void attach(Widget p);
  175.  
  176.  
  177.           The first call to attach creates all widgets in the popup menu,
  178.           using the given widget as the parent of the menu. An event handler
  179.           is added so that the menu automatically is posted by a button three
  180.           press over the given parent. Subsequent calls to attach add the
  181.           ability to post the menu over other widgets.
  182.  
  183.    sssshhhhoooowwww(((())))
  184.            virtual void show();
  185.            virtual void show(XEvent *buttonPressEvent);
  186.  
  187.  
  188.           When called with an X ButtonPress Event, show() posts a menu, using
  189.           the event to position the menu under the mouse cursor. This function
  190.           supports application that wish to control the posting of menus
  191.           directly. Normally, attach() provides an easier way to use menus.
  192.  
  193.  
  194.  
  195.                                                                         PPPPaaaaggggeeee 3333
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202. VVVVkkkkPPPPooooppppuuuuppppMMMMeeeennnnuuuu((((3333xxxx))))                                                VVVVkkkkPPPPooooppppuuuuppppMMMMeeeennnnuuuu((((3333xxxx))))
  203.  
  204.  
  205.  
  206.           With no arguments, show simply manages the popup menu at it's
  207.           current location. This use is not recommended.
  208.  
  209.    mmmmeeeennnnuuuuTTTTyyyyppppeeee(((())))
  210.            virtual VkMenuItemType menuType();
  211.  
  212.  
  213.           The menu type of this class is POPUP.
  214.  
  215.    ccccllllaaaassssssssNNNNaaaammmmeeee(((())))
  216.            virtual const char* className();
  217.  
  218.  
  219.           The class name of this class is "VkPopupMenu".
  220.  
  221. IIIINNNNHHHHEEEERRRRIIIITTTTEEEEDDDD MMMMEEEEMMMMBBBBEEEERRRR FFFFUUUUNNNNCCCCTTTTIIIIOOOONNNNSSSS
  222.    IIIInnnnhhhheeeerrrriiiitttteeeedddd ffffrrrroooommmm VVVVkkkkMMMMeeeennnnuuuu
  223.           isContainer(),  VkMenu(),  VkMenu(), VkMenu(),  VkMenu(),
  224.           findParent(),  ~VkMenu(),  addAction(), addAction(),
  225.           addActionWidget(),  addActionWidget(),  addConfirmFirstAction(),
  226.           addSeparator(), addLabel(),  addToggle(),  addToggle(),  add(),
  227.           addSubmenu(), addSubmenu(),  addSubmenu(),  addRadioSubmenu(),
  228.           addRadioSubmenu(),  addRadioSubmenu(), registerSubmenu(),
  229.           findNamedItem(),  removeItem(),  activateItem(),  deactivateItem(),
  230.           replace(),  getItemPosition(),  getItemPosition(),
  231.           getItemPosition(),  operator[](), numItems(),  _contents,  _nItems,
  232.           _maxItems,
  233.  
  234.  
  235.    IIIInnnnhhhheeeerrrriiiitttteeeedddd ffffrrrroooommmm VVVVkkkkMMMMeeeennnnuuuuIIIItttteeeemmmm
  236.           hide(),  VkMenuItem(),  VkMenuItem(),  manageAll(),  ~VkMenuItem(),
  237.           setLabel(), setPosition(),  activate(),  deactivate(),  remove(),
  238.           show(), _position,  _isBuilt,  _sensitive,  _parentMenu,  _label,
  239.           _isHidden,  _unmanagedWidgets,  _numUnmanagedWidgets,
  240.  
  241.  
  242.    IIIInnnnhhhheeeerrrriiiitttteeeedddd ffffrrrroooommmm VVVVkkkkCCCCoooommmmppppoooonnnneeeennnntttt
  243.           installDestroyHandler(), removeDestroyHandler(), widgetDestroyed(),
  244.           setDefaultResources(), getResources(), manage(), unmanage(),
  245.           baseWidget(), okToQuit(), _name, _baseWidget, _w, deleteCallback
  246.  
  247.  
  248.    IIIInnnnhhhheeeerrrriiiitttteeeedddd ffffrrrroooommmm VVVVkkkkCCCCaaaallllllllbbbbaaaacccckkkkOOOObbbbjjjjeeeecccctttt
  249.           callCallbacks(), addCallback(), removeCallback(),
  250.           removeAllCallbacks()
  251.  
  252.  
  253. CCCCLLLLAAAASSSSSSSSEEEESSSS UUUUSSSSEEEEDDDD BBBBYYYY TTTTHHHHIIIISSSS CCCCLLLLAAAASSSSSSSS
  254.      VkMenuItem
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.                                                                         PPPPaaaaggggeeee 4444
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268. VVVVkkkkPPPPooooppppuuuuppppMMMMeeeennnnuuuu((((3333xxxx))))                                                VVVVkkkkPPPPooooppppuuuuppppMMMMeeeennnnuuuu((((3333xxxx))))
  269.  
  270.  
  271.  
  272. KKKKNNNNOOOOWWWWNNNN CCCCLLLLAAAASSSSSSSSEEEESSSS TTTTHHHHAAAATTTT UUUUSSSSEEEE TTTTHHHHIIIISSSS CCCCLLLLAAAASSSSSSSS
  273.      VkGraph
  274.  
  275. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  276.      VkMenu, VkMenuItem, VkComponent, VkGraph, VkMenuItem
  277.      _V_i_e_w_K_i_t _P_r_o_g_r_a_m_m_e_r'_s _G_u_i_d_e
  278.      _T_h_e _X _W_i_n_d_o_w _S_y_s_t_e_m, DEC Press, Bob Sheifler and Jim Gettys
  279.      _T_h_e _X _W_i_n_d_o_w _S_y_s_t_e_m _T_o_o_l_k_i_t, DEC Press, Paul Asente and Ralph Swick
  280.      _T_h_e _O_S_F/_M_o_t_i_f _P_r_o_g_r_a_m_m_e_r_s _R_e_f_e_r_e_n_c_e, Prentice Hall, OSF
  281.  
  282.  
  283.  
  284.  
  285.  
  286.  
  287.  
  288.  
  289.  
  290.  
  291.  
  292.  
  293.  
  294.  
  295.  
  296.  
  297.  
  298.  
  299.  
  300.  
  301.  
  302.  
  303.  
  304.  
  305.  
  306.  
  307.  
  308.  
  309.  
  310.  
  311.  
  312.  
  313.  
  314.  
  315.  
  316.  
  317.  
  318.  
  319.  
  320.  
  321.  
  322.  
  323.  
  324.  
  325.  
  326.  
  327.                                                                         PPPPaaaaggggeeee 5555
  328.  
  329.  
  330.  
  331.